package com.biostime.springdraw.modules.sys.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.biostime.springdraw.common.service.CrudService;
import com.biostime.springdraw.modules.sys.dao.RolePermissionsDao;
import com.biostime.springdraw.modules.sys.entity.RolePermissions;

/**
 * 角色权限Service
 * @author phil
 * @version 2015-11-24
 */
@Service
@Transactional
public class RolePermissionsService extends CrudService<RolePermissionsDao, RolePermissions> {

	/**
	 * 检测是否支持权限
	 * @param perm
	 * @return
	 */
	public boolean checkPermission(RolePermissions perm) {
		return dao.checkPermission(perm);
	}
	
	/**
	 * 删除所有角色权限
	 * @param exm
	 */
	public void deleteAll(RolePermissions exm) {
		dao.deleteAll(exm);
	}
	
}
